\hypertarget{class_zebulon_1_1_surface_1_1_global_pose_sensor}{
\section{Zebulon::Surface::GlobalPoseSensor Class Reference}
\label{class_zebulon_1_1_surface_1_1_global_pose_sensor}\index{Zebulon::Surface::GlobalPoseSensor@{Zebulon::Surface::GlobalPoseSensor}}
}


Global Pose Sensor component for \hyperlink{namespace_gamblore}{Gamblore} Unmanned System. This class creates a JAUS Global Pose Sensor that combines data from a DGPS and Digital Compass.  


{\ttfamily \#include $<$globalposesensor.h$>$}Inheritance diagram for Zebulon::Surface::GlobalPoseSensor::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2cm]{class_zebulon_1_1_surface_1_1_global_pose_sensor}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_zebulon_1_1_surface_1_1_global_pose_sensor_a91d23962137d43b60fe75a4fedfd8fc1}{
\hyperlink{class_zebulon_1_1_surface_1_1_global_pose_sensor_a91d23962137d43b60fe75a4fedfd8fc1}{GlobalPoseSensor} ()}
\label{class_zebulon_1_1_surface_1_1_global_pose_sensor_a91d23962137d43b60fe75a4fedfd8fc1}

\begin{DoxyCompactList}\small\item\em Constructor. \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_surface_1_1_global_pose_sensor_a28389da171dc8af052e5e2e74ac350c1}{
\hyperlink{class_zebulon_1_1_surface_1_1_global_pose_sensor_a28389da171dc8af052e5e2e74ac350c1}{$\sim$GlobalPoseSensor} ()}
\label{class_zebulon_1_1_surface_1_1_global_pose_sensor_a28389da171dc8af052e5e2e74ac350c1}

\begin{DoxyCompactList}\small\item\em Destructor. \item\end{DoxyCompactList}\item 
virtual int \hyperlink{class_zebulon_1_1_surface_1_1_global_pose_sensor_a0aec33d46ea1389791fdf0fc3f6ef6b3}{SetupService} ()
\begin{DoxyCompactList}\small\item\em Sets the services and registers compass and gps callbacks. \item\end{DoxyCompactList}\item 
int \hyperlink{class_zebulon_1_1_surface_1_1_global_pose_sensor_a10f4ac64e1df8b5c888c49d99825e840}{InitializeGlobalPoseSensor} (const std::string \&compassPortName, const std::string \&gpsPortName)
\begin{DoxyCompactList}\small\item\em Initializes the sensors belonging to the global pose object. \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_surface_1_1_global_pose_sensor_a5249ab2382a749d8f7f2d5e02410eee7}{
int \hyperlink{class_zebulon_1_1_surface_1_1_global_pose_sensor_a5249ab2382a749d8f7f2d5e02410eee7}{ShutdownGlobalPoseSensor} ()}
\label{class_zebulon_1_1_surface_1_1_global_pose_sensor_a5249ab2382a749d8f7f2d5e02410eee7}

\begin{DoxyCompactList}\small\item\em Shutsdown the DGPS and Compass interface. \item\end{DoxyCompactList}\item 
bool \hyperlink{class_zebulon_1_1_surface_1_1_global_pose_sensor_adf9bed5ffa270fe8b955b12956520d2d}{IsSensorInitialized} () const 
\item 
virtual void \hyperlink{class_zebulon_1_1_surface_1_1_global_pose_sensor_a83990bc8ad5f7953c8d44eff92d94c18}{ProcessMessage} (const \hyperlink{class_zebulon_1_1_micro_strain_1_1_message}{MicroStrain::Message} $\ast$msg)
\begin{DoxyCompactList}\small\item\em Gets updated attitude values from the compass. \item\end{DoxyCompactList}\item 
virtual void \hyperlink{class_zebulon_1_1_surface_1_1_global_pose_sensor_aa65029d9b0b7f73f9a2e35ef7d38ff95}{ProcessMessage} (const \hyperlink{class_zebulon_1_1_n_m_e_a_1_1_message}{NMEA::Message} $\ast$msg)
\begin{DoxyCompactList}\small\item\em Method called through gps callback. Sets latitude and longitude. \item\end{DoxyCompactList}\item 
void \hyperlink{class_zebulon_1_1_surface_1_1_global_pose_sensor_aaae1b98c308b9674cad0703fec100623}{PrintAttitude} () const 
\begin{DoxyCompactList}\small\item\em Prints attitude values to the screen. \item\end{DoxyCompactList}\item 
void \hyperlink{class_zebulon_1_1_surface_1_1_global_pose_sensor_a5902b57ea1b0fd72d151a6886d1366ef}{PrintPosition} () const 
\begin{DoxyCompactList}\small\item\em Prints position values to the screen. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_zebulon_1_1_surface_1_1_global_pose_sensor_a0100d22c6ee1d2c710919d50bde1e2fc}{
CxUtils::Mutex \hyperlink{class_zebulon_1_1_surface_1_1_global_pose_sensor_a0100d22c6ee1d2c710919d50bde1e2fc}{mSensorMutex}}
\label{class_zebulon_1_1_surface_1_1_global_pose_sensor_a0100d22c6ee1d2c710919d50bde1e2fc}

\begin{DoxyCompactList}\small\item\em Mutex for sensor. \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_surface_1_1_global_pose_sensor_a7bcae8c6c6987f8775e941e75842b8a5}{
std::vector$<$ double $>$ \hyperlink{class_zebulon_1_1_surface_1_1_global_pose_sensor_a7bcae8c6c6987f8775e941e75842b8a5}{mHeadingHistory}}
\label{class_zebulon_1_1_surface_1_1_global_pose_sensor_a7bcae8c6c6987f8775e941e75842b8a5}

\begin{DoxyCompactList}\small\item\em Heading history. \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_surface_1_1_global_pose_sensor_ab987405f27a2848e175605fc9e34d7ab}{
Jaus::GlobalPose \hyperlink{class_zebulon_1_1_surface_1_1_global_pose_sensor_ab987405f27a2848e175605fc9e34d7ab}{mCombinedGlobalPose}}
\label{class_zebulon_1_1_surface_1_1_global_pose_sensor_ab987405f27a2848e175605fc9e34d7ab}

\begin{DoxyCompactList}\small\item\em Global pose from both sensors. \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_surface_1_1_global_pose_sensor_a867b4f8dfa7028366687582ee9f3c3fd}{
\hyperlink{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x1}{MicroStrain::ThreeDMGX1} \hyperlink{class_zebulon_1_1_surface_1_1_global_pose_sensor_a867b4f8dfa7028366687582ee9f3c3fd}{mCompass}}
\label{class_zebulon_1_1_surface_1_1_global_pose_sensor_a867b4f8dfa7028366687582ee9f3c3fd}

\begin{DoxyCompactList}\small\item\em Digital compass interface. \item\end{DoxyCompactList}\item 
\hypertarget{class_zebulon_1_1_surface_1_1_global_pose_sensor_ad6416d56d327aa9ac71b503d3d458162}{
\hyperlink{class_zebulon_1_1_g_p_s_1_1_d_g_p_s}{GPS::DGPS} \hyperlink{class_zebulon_1_1_surface_1_1_global_pose_sensor_ad6416d56d327aa9ac71b503d3d458162}{mDGPS}}
\label{class_zebulon_1_1_surface_1_1_global_pose_sensor_ad6416d56d327aa9ac71b503d3d458162}

\begin{DoxyCompactList}\small\item\em DGPS Interface. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Static Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{class_zebulon_1_1_surface_1_1_global_pose_sensor_a12cb69bda5adc3ff1ee090b9342093fc}{
static const double {\bfseries mHeadingOffsetDegrees} = -\/11.71}
\label{class_zebulon_1_1_surface_1_1_global_pose_sensor_a12cb69bda5adc3ff1ee090b9342093fc}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
Global Pose Sensor component for \hyperlink{namespace_gamblore}{Gamblore} Unmanned System. This class creates a JAUS Global Pose Sensor that combines data from a DGPS and Digital Compass. 

\subsection{Member Function Documentation}
\hypertarget{class_zebulon_1_1_surface_1_1_global_pose_sensor_a10f4ac64e1df8b5c888c49d99825e840}{
\index{Zebulon::Surface::GlobalPoseSensor@{Zebulon::Surface::GlobalPoseSensor}!InitializeGlobalPoseSensor@{InitializeGlobalPoseSensor}}
\index{InitializeGlobalPoseSensor@{InitializeGlobalPoseSensor}!Zebulon::Surface::GlobalPoseSensor@{Zebulon::Surface::GlobalPoseSensor}}
\subsubsection[{InitializeGlobalPoseSensor}]{\setlength{\rightskip}{0pt plus 5cm}int GlobalPoseSensor::InitializeGlobalPoseSensor (const std::string \& {\em compassPortName}, \/  const std::string \& {\em gpsPortName})}}
\label{class_zebulon_1_1_surface_1_1_global_pose_sensor_a10f4ac64e1df8b5c888c49d99825e840}


Initializes the sensors belonging to the global pose object. Initializes the sensors belonging to the global pose object, this does not initialize the JAUS component.


\begin{DoxyParams}{Parameters}
\item[{\em compassPortName}]System name for compass port. \item[{\em compassPortName}]System name for gps port.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Jaus::JAUS\_\-OK if sensors initialized, otherwise Jaus::JAUS\_\-FAILURE. 
\end{DoxyReturn}
\hypertarget{class_zebulon_1_1_surface_1_1_global_pose_sensor_adf9bed5ffa270fe8b955b12956520d2d}{
\index{Zebulon::Surface::GlobalPoseSensor@{Zebulon::Surface::GlobalPoseSensor}!IsSensorInitialized@{IsSensorInitialized}}
\index{IsSensorInitialized@{IsSensorInitialized}!Zebulon::Surface::GlobalPoseSensor@{Zebulon::Surface::GlobalPoseSensor}}
\subsubsection[{IsSensorInitialized}]{\setlength{\rightskip}{0pt plus 5cm}bool GlobalPoseSensor::IsSensorInitialized () const}}
\label{class_zebulon_1_1_surface_1_1_global_pose_sensor_adf9bed5ffa270fe8b955b12956520d2d}
\begin{DoxyReturn}{Returns}
True if connected to sensors, otherwise false. 
\end{DoxyReturn}
\hypertarget{class_zebulon_1_1_surface_1_1_global_pose_sensor_aaae1b98c308b9674cad0703fec100623}{
\index{Zebulon::Surface::GlobalPoseSensor@{Zebulon::Surface::GlobalPoseSensor}!PrintAttitude@{PrintAttitude}}
\index{PrintAttitude@{PrintAttitude}!Zebulon::Surface::GlobalPoseSensor@{Zebulon::Surface::GlobalPoseSensor}}
\subsubsection[{PrintAttitude}]{\setlength{\rightskip}{0pt plus 5cm}void GlobalPoseSensor::PrintAttitude () const}}
\label{class_zebulon_1_1_surface_1_1_global_pose_sensor_aaae1b98c308b9674cad0703fec100623}


Prints attitude values to the screen. Prints out status and attitude to the screen. \hypertarget{class_zebulon_1_1_surface_1_1_global_pose_sensor_a5902b57ea1b0fd72d151a6886d1366ef}{
\index{Zebulon::Surface::GlobalPoseSensor@{Zebulon::Surface::GlobalPoseSensor}!PrintPosition@{PrintPosition}}
\index{PrintPosition@{PrintPosition}!Zebulon::Surface::GlobalPoseSensor@{Zebulon::Surface::GlobalPoseSensor}}
\subsubsection[{PrintPosition}]{\setlength{\rightskip}{0pt plus 5cm}void GlobalPoseSensor::PrintPosition () const}}
\label{class_zebulon_1_1_surface_1_1_global_pose_sensor_a5902b57ea1b0fd72d151a6886d1366ef}


Prints position values to the screen. Prints out status and position to the screen. \hypertarget{class_zebulon_1_1_surface_1_1_global_pose_sensor_aa65029d9b0b7f73f9a2e35ef7d38ff95}{
\index{Zebulon::Surface::GlobalPoseSensor@{Zebulon::Surface::GlobalPoseSensor}!ProcessMessage@{ProcessMessage}}
\index{ProcessMessage@{ProcessMessage}!Zebulon::Surface::GlobalPoseSensor@{Zebulon::Surface::GlobalPoseSensor}}
\subsubsection[{ProcessMessage}]{\setlength{\rightskip}{0pt plus 5cm}void GlobalPoseSensor::ProcessMessage (const {\bf NMEA::Message} $\ast$ {\em msg})\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{class_zebulon_1_1_surface_1_1_global_pose_sensor_aa65029d9b0b7f73f9a2e35ef7d38ff95}


Method called through gps callback. Sets latitude and longitude. Gets updated attitude values from the \hyperlink{namespace_g_p_s}{GPS}.

This function is called anytime the compass calls the registered callbacks


\begin{DoxyParams}{Parameters}
\item[{\em msg}]Sets the attitude and longitude values. \end{DoxyParams}


Implements \hyperlink{class_zebulon_1_1_g_p_s_1_1_d_g_p_s_1_1_callback}{Zebulon::GPS::DGPS::Callback}.\hypertarget{class_zebulon_1_1_surface_1_1_global_pose_sensor_a83990bc8ad5f7953c8d44eff92d94c18}{
\index{Zebulon::Surface::GlobalPoseSensor@{Zebulon::Surface::GlobalPoseSensor}!ProcessMessage@{ProcessMessage}}
\index{ProcessMessage@{ProcessMessage}!Zebulon::Surface::GlobalPoseSensor@{Zebulon::Surface::GlobalPoseSensor}}
\subsubsection[{ProcessMessage}]{\setlength{\rightskip}{0pt plus 5cm}void GlobalPoseSensor::ProcessMessage (const {\bf MicroStrain::Message} $\ast$ {\em msg})\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{class_zebulon_1_1_surface_1_1_global_pose_sensor_a83990bc8ad5f7953c8d44eff92d94c18}


Gets updated attitude values from the compass. This function is called anytime the compass calls the registered callbacks


\begin{DoxyParams}{Parameters}
\item[{\em msg}]\hyperlink{namespace_message}{Message} structure containing compass info. \end{DoxyParams}


Implements \hyperlink{class_zebulon_1_1_micro_strain_1_1_three_d_m_g_x1_1_1_callback}{Zebulon::MicroStrain::ThreeDMGX1::Callback}.\hypertarget{class_zebulon_1_1_surface_1_1_global_pose_sensor_a0aec33d46ea1389791fdf0fc3f6ef6b3}{
\index{Zebulon::Surface::GlobalPoseSensor@{Zebulon::Surface::GlobalPoseSensor}!SetupService@{SetupService}}
\index{SetupService@{SetupService}!Zebulon::Surface::GlobalPoseSensor@{Zebulon::Surface::GlobalPoseSensor}}
\subsubsection[{SetupService}]{\setlength{\rightskip}{0pt plus 5cm}int GlobalPoseSensor::SetupService ()\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{class_zebulon_1_1_surface_1_1_global_pose_sensor_a0aec33d46ea1389791fdf0fc3f6ef6b3}


Sets the services and registers compass and gps callbacks. Set up type of services/messages supported by component. Since this component is a Global Pose Sensor, then we must add this service to our list of supported services, listing what messages can be sent to this component.

\begin{DoxyReturn}{Returns}
Jaus::JAUS\_\-OK. 
\end{DoxyReturn}


The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
C:/Users/Matt/Documents/School/Robotics/zebulon/v2/surface/include/globalposesensor.h\item 
C:/Users/Matt/Documents/School/Robotics/zebulon/v2/surface/src/globalposesensor.cpp\end{DoxyCompactItemize}
